file_dir='D:\study\GHOST\deeplearning_ghostimage';

%%%%%%%%%%%%%% load the training output data %%%%%%%%%%%%%
load([file_dir,'\training_output.mat']);
total_num=10000;
output_3D=zeros(54,98,1,total_num);
for i=1:total_num
    eval(['output_3D(:,:,1,i)=image',num2str(i),';'])
    output_3D(:,:,1,i)=(output_3D(:,:,1,i)-min(min(output_3D(:,:,1,i))))./(max(max(output_3D(:,:,1,i)))-min(min(output_3D(:,:,1,i))));
    
end
output=zeros(54*98,total_num);

for i=1:total_num
    
    output(:,i)=reshape(output_3D(:,:,i),54*98,1);
end
% save('training_output_norm','output')

% %%%%%%%%%%%%%% load the training input data %%%%%%%%%%%%%
% the directory of your training input data
sec_dir='\b0.01\';
% the name of your training input data
file_name_input='rednoise_orthonormalize_5292_input.mat';
load([file_dir,sec_dir,file_name_input])
total_num=10000;
input_3D=zeros(54,98,1,total_num);
for i=1:total_num
    eval(['input_3D(:,:,1,i)=image_input',num2str(i),';'])
    input_3D(:,:,i)=(input_3D(:,:,1,i)-min(min(input_3D(:,:,1,i))))./(max(max(input_3D(:,:,1,i)))-min(min(input_3D(:,:,1,i))));
end

save('training_input_rednoise_normb0.01','input_3D')
